﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace WcfFlashRemoting.Example5.Contract
{
    [ServiceContract(Namespace = "urn:WcfFlashRemoting:Examples:Example5")]
    public interface ICalculatorContract
    {
        [OperationContract]
        MathResult Add(MathParameters parameters);
    }

    [MessageContract]
    public class MathParameters
    {
        [MessageHeader]
        public AuthenticationHeader Authentication { get; set; }
        [MessageBodyMember]
        public double a { get; set; }
        [MessageBodyMember]
        public double b { get; set; }
    }

    [DataContract]
    public class AuthenticationHeader
    {
        [DataMember]
        public string User { get; set; }
    }

    [MessageContract]
    public class MathResult
    {
        [MessageBodyMember]
        public double Result { get; set; }
        [MessageBodyMember]
        public string User { get; set; }
    }
}
